<?php
echo $this->Html->script('prototype'); 
echo $this->Html->script('effects'); 
echo $this->Html->script('custom_scripts'); 

?>

<script>
<!--
var req;

function loadXMLDoc(url) {

   // Internet Explorer
   try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
   catch(e) {
      try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
      catch(oc) { req = null; }
   }

   // Mozailla/Safari
   if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }

   // Call the processChange() function when the page has loaded
   if (req != null) {
      req.onreadystatechange = processChange;
      req.open("GET", url, true);
      req.send(null);
   }
}

function processChange() {
   // The page has loaded and the HTTP status code is 200 OK
   if (req.readyState == 4 && req.status == 200) {

      // Write the contents of this URL to the searchResult layer
      getObject("searchResult").innerHTML = req.responseText;
   }
}

function getObject(name) {
   var ns4 = (document.layers) ? true : false;
   var w3c = (document.getElementById) ? true : false;
   var ie4 = (document.all) ? true : false;

   if (ns4) return eval('document.' + name);
   if (w3c) return document.getElementById(name);
   if (ie4) return eval('document.all.' + name);
   return false;
}

window.onload = function() {
   getObject("q").focus();
}

// -->
</script>
<div class="index">Tìm kiếm thông tin
 <div class="smart-green">
<input style="width: 700px;color:#F00; margin: 0px auto 0px 20px; font-size: 1.0em;" type="text" name="q" id="q" size="20" placeholder=".....Gõ vào tên quyết định cần tìm....." onkeyup="loadXMLDoc('tim_quyetdinh/'+this.value)" />
<div align="left" id="searchResult" name="searchResult" style="font-family:Arial; font-size:12px; border:none; padding:3px; ">
</div>
</div>
</div>
<!--
<div class="actions">
   <h3><?php __('Tìm kiếm theo thông tin khác'); ?></h3>
   <ul>
      <li><?php echo $this->Html->link(__('T/k C/trình theo Tên', true), array('action' => 'tk_tenct')); ?></li>
      <li><?php echo $this->Html->link(__('T/k C/trình theo Kinh phí', true), array('action' => 'tk_kinhphi')); ?></li>
      <li><?php echo $this->Html->link(__('T/k C/trình theo Thời gian', true), array('action' => 'tk_thoigian')); ?></li>
      <li><?php echo $this->Html->link(__('T/k C/trình theo Nguồn vốn', true), array('action' => 'tk_nguonvon')); ?></li>
      <li><?php echo $this->Html->link(__('T/k C/trình theo Quyết định', true), array('action' => 'tk_quyetdinh')); ?></li>
      <li><?php echo $this->Html->link(__('T/k C/trình theo Chủ đầu tư', true), array('action' => 'tk_chudautu')); ?></li>
      
      <li><?php echo $this->Html->link(__('T/k C/trình theo Đ/vị thi công', true), array('action' => 'tk_dvthicong')); ?></li>
      
   </ul>
   </div>
-->